
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>3.linux_安装mycat · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="mycat的端口.html" />
    
    
    <link rel="prev" href="mycat目录.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="linux_安装mysql.html">
            
                <a href="linux_安装mysql.html">
            
                    
                    1.CentOS7离线安装MySQL
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="mycat目录.html">
            
                <a href="mycat目录.html">
            
                    
                    2.mycat目录
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.4" data-path="linux_安装mycat.html">
            
                <a href="linux_安装mycat.html">
            
                    
                    3.linux_安装mycat
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="mycat的端口.html">
            
                <a href="mycat的端口.html">
            
                    
                    3.mycat的端口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="linux切换语言.html">
            
                <a href="linux切换语言.html">
            
                    
                    4.linux切换语言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="vagrant_开发端口.html">
            
                <a href="vagrant_开发端口.html">
            
                    
                    5.vagrant_开发端口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="schema_xml_dataHost.html">
            
                <a href="schema_xml_dataHost.html">
            
                    
                    6.schema.xml dataHost
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="mycat简单入门demo.html">
            
                <a href="mycat简单入门demo.html">
            
                    
                    7.mycat简单入门demo
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="读写分离.html">
            
                <a href="读写分离.html">
            
                    
                    8.读写分离
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="多个vagrant.html">
            
                <a href="多个vagrant.html">
            
                    
                    9.多个vagrant
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="mycat_router.html">
            
                <a href="mycat_router.html">
            
                    
                    10.mycat_router
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="mysql如何做到主从复制.html">
            
                <a href="mysql如何做到主从复制.html">
            
                    
                    11.mysql如何做到主从复制
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >3.linux_安装mycat</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="&#x8FD0;&#x884C;&#xFF1A;">&#x8FD0;&#x884C;&#xFF1A;</h2>
<p>Mycat-server-1.5.1-RELEASE-20160509173344-linux (1).tar</p>
<pre><code>tar xvf ./Mycat-server-1.5.1-RELEASE-20160509173344-linux (1).tar 
cp -r  mycat /usr/local/mycat  
cd /usr/local/mycat/  
chmod +x *  


#&#x3010;&#x914D;&#x7F6E;&#x73AF;&#x5883;&#x53D8;&#x91CF;&#x3011;
vi /etc/profile
#&#x5728;&#x6587;&#x4EF6;&#x672B;&#x5C3E;&#x6DFB;&#x52A0;&#x4E00;&#x884C;&#xFF1A;
export MYCAT_HOME=/usr/local/mycat
#&#x4F7F;&#x4FEE;&#x6539;&#x751F;&#x6548;&#xFF1A;
source /etc/profile
#&#x6D4B;&#x8BD5;&#x662F;&#x5426;&#x751F;&#x6548;&#xFF1A;
echo $MYCAT_HOME



&#x3010;&#x8BBE;&#x7F6E;JAVA_HOME&#xFF0C;&#x52A0;3&#x884C;&#x3011;
vim /etc/profile
ls /usr/lib/jvm/
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

source /etc/profile
</code></pre><p>linux&#xFF1A;</p>
<h1 id="usrlocalmycatbinmycat-start">/usr/local/mycat/bin/mycat start</h1>
<p>./mycat start &#x542F;&#x52A8;</p>
<p>./mycat stop &#x505C;&#x6B62;</p>
<p>./mycat console &#x524D;&#x53F0;&#x8FD0;&#x884C;</p>
<p>./mycat install &#x6DFB;&#x52A0;&#x5230;&#x7CFB;&#x7EDF;&#x81EA;&#x52A8;&#x542F;&#x52A8;&#xFF08;&#x6682;&#x672A;&#x5B9E;&#x73B0;&#xFF09;</p>
<p>./mycat remove &#x53D6;&#x6D88;&#x968F;&#x7CFB;&#x7EDF;&#x81EA;&#x52A8;&#x542F;&#x52A8;&#xFF08;&#x6682;&#x672A;&#x5B9E;&#x73B0;&#xFF09;</p>
<p>./mycat restart &#x91CD;&#x542F;&#x670D;&#x52A1;</p>
<p>./mycat pause &#x6682;&#x505C;</p>
<p>./mycat status &#x67E5;&#x770B;&#x542F;&#x52A8;&#x72B6;&#x6001;</p>
<pre><code>[root@localhost /]# /home/mycat/bin/mycat  start
Starting Mycat-server...
Mycat-server is already running.
</code></pre>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="mycat目录.html" class="navigation navigation-prev " aria-label="Previous page: 2.mycat目录">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="mycat的端口.html" class="navigation navigation-next " aria-label="Next page: 3.mycat的端口">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"3.linux_安装mycat","level":"1.4","depth":1,"next":{"title":"3.mycat的端口","level":"1.5","depth":1,"path":"mycat的端口.md","ref":"./mycat的端口.md","articles":[]},"previous":{"title":"2.mycat目录","level":"1.3","depth":1,"path":"mycat目录.md","ref":"./mycat目录.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"linux_安装mycat.md","mtime":"2018-07-22T11:02:39.448Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-07-23T06:58:37.163Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

